home *** CD-ROM | disk | FTP | other *** search
/ Total Web Page (Professional Suite) / Total Web Page 99.iso / CGI / DOWNLOAD.CGI-S=RAND_TEXT&C=TXT&F=README < prev    next >
Text File  |  1996-06-03  |  6KB  |  114 lines

  1. ##############################################################################
  2. # Random Text                   Version 1.0                                  #
  3. # Copyright 1996 Matt Wright    mattw@worldwidemart.com                      #
  4. # Created 7/13/96               Last Modified 7/13/96                        #
  5. # Scripts Archive at:           http://www.worldwidemart.com/scripts/        #
  6. ##############################################################################
  7. # If you run into any problems while trying to configure this scripts, help  #
  8. # is available.  The steps you should take to get the fastest results, are:  #
  9. #       1) Read this file thoroughly                                         #
  10. #       2) Consult the Matt's Script Archive Frequently Asked Questions:     #
  11. #               http://www.worldwidemart.com/scripts/faq/                    #
  12. #       3) If you are still having difficulty installing this script, send   #
  13. #          e-mail to: scripts-help@tahoenet.com                              #
  14. #          Include any error messages you are receiving and as much detail   # 
  15. #          as you can so we can spot your problem.  Also include the variable#
  16. #          configuration block that is located at the top of the script.     #
  17. #                                                                            #
  18. # Hopefully we will be able to help you solve your problems.  Thank you.     #
  19. ##############################################################################
  20. # COPYRIGHT NOTICE                                                           #
  21. # Copyright 1996 Matthew M. Wright  All Rights Reserved.                     #
  22. #                                                                            #
  23. # Random Text may be used and modified free of charge by anyone so long as   #
  24. # this copyright notice and the comments above remain intact.  By using this #
  25. # code you agree to indemnify Matthew M. Wright from any liability that      #  
  26. # might arise from it's use.                                                 #  
  27. #                                                                            #
  28. # Selling the code for this program without prior written consent is         #
  29. # expressly forbidden.  In other words, please ask first before you try and  #
  30. # make money off of my program.                                              #
  31. #                                                                            #
  32. # Obtain permission before redistributing this software over the Internet or #
  33. # in any other medium.  In all cases copyright and header must remain intact #
  34. ##############################################################################
  35.  
  36. Random Text is a program which takes a plain text file, which contains a 
  37. series of phrases, quotes, lines of text, etc... and a delimiter (the 
  38. character(s) which separate each entry) and will randomly choose one of the
  39. phrases and display it on your web page.  This requires the use of Server
  40. Side Includes, which you can read more about at the FAQ URL listed above.
  41.  
  42. There are two files included with this script:
  43.         1) README       - This file; includes detailed installation 
  44.                   instructions.
  45.         2) rand_text.pl - The Perl script which generates the random phrase
  46.                           and siaplys it on your web page.
  47.  
  48. The rand_text.pl file has two variables which must be modified.  You then 
  49. must place this file in a special executable directory (usually called 
  50. cgi-bin) or rename it to end with a .cgi extension if your server is set up 
  51. that way.
  52.  
  53. RAND_TEXT.PL -
  54.  
  55.     There are two variables in this program which must be modified:
  56.  
  57.     $random_file = "/path/to/random.txt";
  58.         This variable points to the location of the file which 
  59.         contains the phrases which you wish to have randomly 
  60.         displayed.  This shoul dbe a system path and not a URL.
  61.  
  62.     $delimiter = "\n\%\%\n";
  63.         This specifies what separates each record.  If you leave it
  64.         as the default, your $random_file database should look like:
  65.  
  66.        -----------begin sample random database file--------------
  67.            Phrase one would go here.
  68.         As much white space or formatting as you want.
  69.          %%
  70.        Second Phrase would go here.
  71.        %%
  72.        And the next
  73.          Second line of the next.
  74.        %%
  75.        Etc...
  76.        -----------end sample random database file----------------
  77.  
  78.         If you set $delimiter = "\n";, then the script would assume
  79.         that every line is a separate phrase and randomize the 
  80.         file based on that.
  81.  
  82. ##############################################################################
  83.  
  84.         How to Implement This In Your Web Pages.
  85.  
  86. This script must be called as a Server Side Include, or it can also be called
  87. on a page by itself (however that is not as nice looking.)  Below are some 
  88. examples of how to call this program:
  89.  
  90.     <!--#exec cgi="/url/path/to/rand_text.cgi"-->
  91.  
  92. That woudl simply call the program from a Server Side Include and the Random 
  93. Text woud appear in that location on your web page.
  94.  
  95. ##############################################################################
  96. HISTORY
  97.  
  98.    Version 1.0  - 7/13/95       - First Version Released
  99.  
  100. ##############################################################################
  101.  
  102. Have fun with this script, but if you can, please follow these rules:
  103.  
  104. 1) If you implement it on a page, please let me know the URL of where it is 
  105.    implemented so I can see my work
  106.  
  107. and
  108.  
  109. 2) Please keep my name and url in the script itself somewhere, and if you 
  110. would like you could even add it to your page, but that is not necessary.
  111.  
  112. If you have any questions, let me know and I will try and help!
  113. ____________________________________________________________________________
  114. Matt Wright - mattw@worldwidemart.com  http://www.worldwidemart.com/scripts/